<!--
 * @Author: Chuckie
 * @Email: chuckie@aliyun.com
 * @Date: 2022-11-10 13:13:11
 * @LastEditTime: 2023-04-14 11:16:50
 * @Description: 
 * @FilePath: /web/src/App.vue
 *  
-->
<template>
  <el-config-provider   namespace="el" size="small">
    <router-view />
  </el-config-provider>
</template>
<script setup lang="ts">
import { setToken } from '@/utils/auth'
import { useAppStore } from '@/store/app'
import { useI18n } from 'vue-i18n'
import { useUserStore } from './store/user'

const { locale } = useI18n()
 
 
locale.value = localStorage.getItem('language') || 'zhCN'

const appStore = useAppStore()
const settings = computed(() => {
  return appStore.settings
})
onBeforeMount(() => {
  if (!settings.value.isNeedLogin) setToken(settings.value.tmpToken)
})
</script>
